//
//  ZCInvolvedDeatailsProgressCell.m
//  zctx
//
//  Created by apple on 15/10/12.
//  Copyright © 2015年 sanliang. All rights reserved.
//

#import "ZCInvolvedDeatailsProgressCell.h"

@interface ZCInvolvedDeatailsProgressCell()
{
    float finlishInt;
}
@end
@implementation ZCInvolvedDeatailsProgressCell

- (void)awakeFromNib {
    // Initialization code
    self.selectionStyle = UITableViewCellSelectionStyleNone;
    self.progressView.trackTintColor = [UIColor colorWithHexString:@"#81d5ce"];
    self.progressView.progressTintColor = [UIColor colorWithHexString:@"#03ab9e"];
    
    self.progressView.font = [UIFont fontWithName:@"Futura-CondensedExtraBold" size:16];
    self.progressView.popUpViewAnimatedColors = @[[UIColor colorWithHexString:@"#03ab9e"]];
    [self.progressView showPopUpViewAnimated:YES];
    self.progressView.progress = 0.0;
    self.moneyLable.textColor = CellTextColor;

}

-(void)setDetailModel:(ZCProjectdetailsModel *)detailModel{
    _detailModel = detailModel;
    float priceStr = [[NSString stringWithFormat:@"%@",_detailModel.finish]floatValue]/100;
    float money = [[NSString stringWithFormat:@"%@",_detailModel.emoney]integerValue]/100;
    finlishInt =[[NSString stringWithFormat:@"%.2f",priceStr/money] floatValue];
    [self.progressView setProgress:finlishInt animated:YES];
    self.moneyLable.text = [NSString stringWithFormat:@"%.0f元",priceStr];
    self.truemoneyLable.text = [NSString stringWithFormat:@"目标金额:%.0f元",money];
}

- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
